package com.newtouch.nbo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class HelloController {

    @Value ("${server.port}")

    private String port;
     @RequestMapping(value = "/hi",method = RequestMethod.GET)
      public String hi(@RequestParam("name") String name){
         log.info ("name:{},port:{}",name,port);
         return "hi "+name+",i am from port:" +port;
     }
}
